package com.guigu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.guigu.domain.entity.SubjectInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 题目接口
 */
@Mapper
public interface SubjectInfoMapper extends BaseMapper<SubjectInfo> {

    /**
     * 条件查询总记录数
     * @param subjectInfo
     * @param categoryId
     * @param labelId
     * @return
     */
    Integer countByCondition(@Param("subjectInfo")SubjectInfo subjectInfo,
                             @Param("categoryId")Long categoryId,
                             @Param("labelId")Long labelId);
    /**
     * 分页查询
     * @param subjectInfo
     * @param labelId
     * @param categoryId
     * @param start
     * @param pageSize
     * @return
     */
    List<SubjectInfo> queryPage(@Param("subjectInfo") SubjectInfo subjectInfo,
                                @Param("labelId") Long labelId,
                                @Param("categoryId") Long categoryId,
                                @Param("start") int start,
                                @Param("pageSize") Integer pageSize);


}
